<template>
  <div>
    <el-container v-if="isshowmain" >
      <!-- <el-header>

      </el-header> -->
      <el-main>
        <el-row :gutter="24">
          <el-col :span="12">
            <el-card @click="wordclick">
              <div>
                word协同编辑
              </div>
            </el-card>
          </el-col>
          <el-col :span="12">
            <el-card @click="exclclick">
              <div>
                excel协同编辑
              </div>
            </el-card>
          </el-col>
          <el-col :span="12">
            <el-card @click="shopclick">
              <div>
                小程序商城
              </div>
            </el-card>
          </el-col>
          <el-col :span="12">
            <el-card @click="shopadminclick">
              <div>
                小程序商城后端
              </div>
            </el-card>
          </el-col>
        </el-row>
      </el-main>
      <el-footer>
        <a target="_blank" rel="noopener noreferrer" href="https://beian.miit.gov.cn/">蜀ICP备20024706号-1</a>
      </el-footer>
    </el-container>
  
    <CanvasEditor v-if="isshowword"  ref="child" v-model:data="canvaseditordata" :backmain="wordbackmain"></CanvasEditor>
    <UniverEditor  v-if="isshowexcel" :backmain="excelbackmain"></UniverEditor>
    
  </div>
</template>

<script>
  import { ref } from 'vue'
  import * as signalR from '@microsoft/signalr';
  import CanvasEditor from './canvas-editor/index.vue'
  import UniverEditor from './univer-editor/index.vue'
  export default {
  name: 'HelloWorld',

  data(){
    return{
      connection: null,
      msgs: [],
      canvaseditordata:{main: []},
      isshowmain:true,
      isshowword:false,
      isshowexcel:false
    }
  },
  
  props: {
    msg: String,
  },
  methods:{
    excelbackmain(){
      this.isshowexcel=false;
      this.isshowmain=true;
    },
    wordbackmain(){
      this.isshowword=false;
      this.isshowmain=true;
    },
    handleClose(){
      this.dialogVisible=false;
    },
    wordclick(){
      this.isshowword=true;
      this.isshowmain=false;
    },
    exclclick(){
      this.isshowexcel=true;
      this.isshowmain=false;
    },
    shopclick(){
      window.open('https://www.hbjava.cn:5006', '_blank');
    },
    shopadminclick(){
      window.open('https://www.hbjava.cn:5008', '_blank');
    },
  },
  created(){
   
  },
  mounted(){
  },
  components:{CanvasEditor,UniverEditor}
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
